import at.guigu.pojo.Brand;
import at.guigu.service.BrandService;
import org.junit.Test;

import java.io.IOException;
import java.util.List;

public class InquireOne {
    //1 创建一个私有的BrandService对象
    private BrandService brandService = new BrandService();

    // 查询所有条数据
    @Test
    public void getAll() throws IOException {
        List<Brand> brands = brandService.getAll();
        System.out.println(brands);
    }
    // 查询单条数据：通过id查询
    @Test
    public void getById() throws IOException {
        int id = 1;
        Brand brand = brandService.getById(id);
        System.out.println(brand);
    }
    // 静态单条件查询
    @Test
    public void selectBySingleConOne() throws IOException {
        int id = 1;
        List<Brand> brands = brandService.selectBySingleConOne(id);
        System.out.println(brands);
    }
}
